counts = {'MBP': 268, 'HP': 125, 'DELL': 201, 'Lenovo': 199, 'acer': 99}

# 1. 需求：提取电脑台数大于等于200
# 获取所有键值对数据，判断v值大于等于200 返回  字典
print(counts.items())
counts = {'MBP': 268, 'HP': 125, 'DELL': 201, 'Lenovo': 199, 'acer': 99}
# {key_expression: value_expression for item in iterable if condition}
dict1 = {key: value for (key, value) in counts.items() if value >= 200}
print(dict1)
# 使用循环遍历原字典的键值对
for key, value in counts.items():
    if value >= 200:
        dict1[key] = value

print(dict1)



